
import VueRouter from 'vue-router'
import home from './components/tabs/Home.vue'
import members from './components/tabs/Members.vue'
import user from './components/tabs/User.vue'
import shopCar from './components/tabs/shopCar.vue'
import see from './components/tabs/See.vue'
import userlogin from './components/user/Login.vue'
import account from './components/user/Account.vue'
import userInfo from './components/user/UserInfo.vue'
import register from './components/user/Register.vue'
import registe from './components/user/Register.vue'
import head from './components/user/Head.vue'
import retrieve from './components/user/Retrieve.vue'
import vip from './components/user/Vip.vue'
import productList from './components/produces/ProductList.vue'
import productInfo from './components/produces/ProductInfo.vue'
import productsee from './components/produces/ProductSee.vue'
// import userchat from './components/chat/Userpage.vue'
// import serverchar from './components/chat/Serverpage.vue'
import carbill from './components/bill/Carbill.vue'
import addbill from './components/bill/Addbill.vue'
import unbill from './components/bill/Unbill.vue'
import watchtv from './components/video/WatchTv.vue'

let routerobj = new VueRouter({
    routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/members',component:members},
    {path:'/shopCar',component:shopCar},
    { path: '/user', component: user },
    { path: '/see', component: see },
    // 设置组件
    { path: '/user/login', component: userlogin },
    { path: '/user/userInfo', component: userInfo },
    { path: '/user/register', component: register },
    { path: '/user/registe/:id/:img', component: registe },
    { path: '/user/retrieve', component: retrieve },
    { path: '/user/head', component: head},
    { path: '/user/account/:id', component: account },
    { path: '/user/vip/:uid/:vid/:content/:discount', component: vip },
    // 商品组件
    { path: '/home/productlist', component: productList },
    { path: '/home/productlist/productinfo/:pid', component: productInfo },
    // 聊天组件
    // { path: '/product/user', component: userchat },
    // { path: '/product/server', component: serverchar },
    // 账单组件
    { path: '/bill/carbill/:money/:pids', component: carbill },
    { path: '/bill/addbill/:uid', component: addbill },
    { path: '/bill/unbill', component: unbill },
    // 视频组件
    { path: '/video/watchtv', component: watchtv },
    // 公告
    { path: '/produces/productsee/:id', component: productsee },
    ],
    linkActiveClass:'mui-active'
});

export default routerobj
